package com.zd.bms.service;

import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.zd.bms.bean.vo.req.OrderListReqVo;
import com.zd.common.bean.model.BmsUser;
import com.zd.common.bean.model.TicketOrder;
import com.zd.common.dao.common.Page;
import com.zd.common.service.IBaseService;

public interface ITicketOrderService extends IBaseService<TicketOrder>  {
	
	/**
	 * 根据身份证号码或者取票码来获取整个订单的游客信息
	 * @param userIdNumber 身份证号码
	 * @param checkCode 取票码
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> getTicketOrderDetailList(String userIdNumber,String checkCode,Integer modeType ,BmsUser bmsUser) throws Exception;
	
	/**
	 * PC端售票员下订单 
	 * @param userIdInfoList 游客信息
	 * @param ticketInfoId 票Id
	 * @return 返回支付二维码以及票务信息
	 */
	@Transactional(rollbackFor = Exception.class)
	Map<String, Object> buyTiecktsPC(String userIdInfoList,Integer ticketInfoId, BmsUser bmsUser)throws Exception;
	
	/**
	 * PC端售票员激活提前生成的二维码 
	 * @param userIdInfoList 游客信息
	 * @param ticketInfoId 票Id
	 * @return 返回支付二维码以及票务信息
	 */
	@Transactional(rollbackFor = Exception.class)
	Map<String, Object> activationTiecktsPC(String userIdInfoList,Integer ticketInfoId, BmsUser bmsUser)throws Exception;
	
	/**
	 * 将提前生成的二维码与游客信息绑定
	 * @param userIdInfo 游客信息
	 * @param ticketInfoId 票Id
	 * @param bmsUser 售票员
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> bindingTiecktsPC(String userIdInfo,Integer ticketInfoId, BmsUser bmsUser, Integer orderId ,String checkCcode)throws Exception;
	
	/**
	 * 根据条件给订单做分页查询
	 * @param req  订单查询请求类
	 * @return
	 * @throws Exception
	 */
	Page<TicketOrder> pageTicketOrder(OrderListReqVo req , BmsUser bmsUser)throws Exception;
	
	/**
	 * 根据订单号查询整个订单的信息
	 * @param orderId
	 * @return
	 */
	Map<String, Object> findOrderDetails(Integer orderId)throws Exception;
	
	/**
	 * 当班统计
	 * @param bmsUser
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> statistics(OrderListReqVo req ,BmsUser bmsUser)throws Exception;
	
	
}
